package com.bawei.module_mine.http.api


import com.bawei.lib_common.entity.ResponseEntity
import com.bawei.module_mine.model.AddAccountModel
import com.bawei.module_mine.model.LikeModel
import com.bawei.module_mine.model.MineModel
import com.bawei.module_mine.model.UserModel
import retrofit2.http.Body
import retrofit2.http.Field
import retrofit2.http.FormUrlEncoded
import retrofit2.http.GET
import retrofit2.http.POST
import retrofit2.http.PUT
import retrofit2.http.Query

interface LoginApiService {

    @POST("/user/login")
    suspend fun getLogin(
        @Query("username") username: String,
        @Query("password") password: String
    ): ResponseEntity<UserModel>

    @POST("/account/addAccount")
    suspend fun getAddAccount(@Body body: AddAccountModel): ResponseEntity<AddAccountModel>

    @GET("/account/findAccountById")
    suspend fun getFindAccountById(@Query("id") id: Int): ResponseEntity<AddAccountModel>

    @GET("/agree/myList")
    suspend fun getLike(
        @Query("sourceflag") sourceflag: String,
        @Query("userId") userId: Int
    ): ResponseEntity<LikeModel>

    @PUT("/user/modifyHeadImg")
    suspend fun setImg(@Query("userid") id: Int, @Query("img") img: String): ResponseEntity<Boolean>

    @POST("/user/quickLoginJG")
    suspend fun quickLogin(
        @Query("exID") exID: String,
        @Query("loginToken") loginToken: String
    ): ResponseEntity<UserModel>

    @GET("/mall/goodsShow/viewShowedGoods")
    suspend fun getMine() : ResponseEntity<MineModel>
}




